<?php
/**
 * Created by PhpStorm.
 * User: touchmini
 * Date: 14-2-11
 * Time: 下午4:53
 */
class Posts extends Eloquent
{
    protected $table = 'posts';

    public function comments()
    {
        return $this->hasMany('Comments','video_id');
    }
    public function likes()
    {
        return $this->hasMany('Likes','video_id');
    }
    public function profile()
    {
        return $this->belongsTo('profile','user_id');
    }
}